import request from '@/utils/request'

// 查询定增项目-收盘价明细列表
export function listDealSpoClosePrice(query) {
  return request({
    url: '/price/dealSpoClosePrice/list',
    method: 'get',
    params: query
  })
}

// 查询定增项目-收盘价明细详细
export function getDealSpoClosePrice(id) {
  return request({
    url: '/price/dealSpoClosePrice/' + id,
    method: 'get'
  })
}

// 保存定增项目-收盘价明细
export function saveDealSpoClosePrice(data) {
  return request({
    url: '/price/dealSpoClosePrice/save',
    method: 'post',
    data: data
  })
}

// 删除定增项目-收盘价明细
export function delDealSpoClosePrice(id) {
  return request({
    url: '/price/dealSpoClosePrice/' + id,
    method: 'delete'
  })
}
// 查询定增项目-市值变动chart
export function getChart(query) {
  return request({
    url: '/price/dealSpoClosePrice/chart',
    method: 'get',
    params: query
  })
}
// 导出定增项目-收盘价明细
export function exportDealSpoClosePrice(query) {
  return request({
    url: '/price/dealSpoClosePrice/export',
    method: 'get',
    params: query
  })
}

export function getChgByClosePrice(query) {
  return request({
    url: '/price/dealSpoClosePrice/getChgByClosePrice',
    method: 'get',
    params: query
  })
}

export function getYieldByClosePrice(query) {
  return request({
    url: '/price/dealSpoClosePrice/getYieldByClosePrice',
    method: 'get',
    params: query
  })
}

export function getAmountByClosePrice(query) {
  return request({
    url: '/price/dealSpoClosePrice/getAmountByClosePrice',
    method: 'get',
    params: query
  })
}

export function getTotalShareByDealId(dealId) {
  return request({
    url: '/price/dealSpoClosePrice/getTotalShareByDealId/' + dealId,
    method: 'get'
  })
}

export function getClosePriceByDate(date) {
  return request({
    url: '/price/dealSpoClosePrice/getClosePriceByDate/' + date,
    method: 'get'
  })
}
